use stencil_tysys::FieldRef;
use thiserror::Error;

#[derive(Debug, Error)]
pub enum Error {
    /// Some type in the SSA was bad.  This probably should have been prevented sooner.
    #[error("ssa type invalid")]
    SsaTypeMismatch,

    #[error("unknown field {0:?}")]
    UnknownField(FieldRef),

    #[error("tried to access container properly while not a container")]
    NotContainer,

    #[error("unimplemented")]
    Unimplemented,

    #[error("{0}")]
    Other(String),
}
